wayland/surface: Clear shadow width when hiding
authorJonas Ådahl <jadahl@gmail.com>
Fri, 4 Dec 2020 17:35:01 +0000 (18:35 +0100)
committerJonas Ådahl <jadahl@gmail.com>
Mon, 7 Dec 2020 19:37:29 +0000 (20:37 +0100)
Not doing this means the next time the same surface is shown, if the
shadow size wasn't changed, it wouldn't be sent to the compositor, which
then would result in compositor deriving its own window geometry which
would include the shadow margin.

This fixes an issue where the file chooser dialog would grow each time
it opened.

gdk/wayland/gdksurface-wayland.c

index b8a1d79f817d7c5dbb4dc61c644192670674b20b..d5e777638c6815bd18c1c702d2603001357d8013 100644 (file)
@@ -2957,6 +2957,8 @@ gdk_wayland_surface_hide_surface (GdkSurface *surface)
 
   unset_transient_for_exported (surface);
 
+  impl->last_sent_window_geometry = (GdkRectangle) { 0 };
+
   _gdk_wayland_surface_clear_saved_size (surface);
   impl->mapped = FALSE;
 }